/**
 * 
 */
package com.gragra.applications;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashSet;
/**
 * @author Christoph Teichmann
 * 23.08.2013
 */
public class PrintTags
{
	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException
	{
		BufferedReader br = new BufferedReader(new FileReader(args[0]));
		String line;
		HashSet<String> set = new HashSet<String>();
		while((line = br.readLine()) != null)
		{
			String[] parts = line.split("\\s+");
			for(String string : parts)
			{set.add(string.split("\\|")[1]);}
		}
		for(String s : set)
		{System.out.println(s);}
		br.close();
	}
}